<extend name="Public:layout"/>
<block name="css">
    <link rel="stylesheet" href="__STATIC__/plugin/wangEditor/css/wangEditor.min.css">
</block>

<block name="js">
    <!--<script src="__STATIC__/plugin/wangEditor/js/wangEditor.min.js"></script>-->
    <script type="text/javascript">
        var QINIU = $.parseJSON('{$qiniu|json_encode}');
        var saveto ='qiniu';   //储存位置为七牛云，对应于插件里的判断值
        var qiniu_uptoken=QINIU.token;  //七牛云服务端生成的uptoken
        var qiniu_upload_domain='http://upload.qiniu.com';   //七牛云上传地址，一般无需修改，https需要修改成对应的七牛云https上传域名
        var qiniu_bucket_domain=QINIU.domain;   //七牛云bucket设置的域名
    </script>
    <script src="__STATIC__/plugin/plupload/plupload.full.min.js"></script>
    <script src="__STATIC__/plugin/qiniu.min.js"></script>
    <script src="__STATIC__/plugin/ckeditor/ckeditor.js"></script>
</block>
<block name="content">
    <div class="panel admin-panel">
        <div class="panel-head" id="add"><strong><span class="icon-pencil-square-o"></span>编辑站点页面 - {$pages[$page]}</strong></div>
        <div style="height:30px;"></div>
        <div class="container-fluid">
            <form method="post" class="form form-x ajax-submit" action="{:U('')}">
                <input type="hidden" name="page" value="{$info.key}">

                <div class="row">
                    <div class="col-lg-12 col-md-12">
                        <div class="col-lg-1 col-md-1">banner图</div>
                        <div class="col-lg-10 col-md-10">
                            <button type="button" class="btn btn-primary upload-banner">上传图片</button>
                            <button type="button" class="btn btn-info show-upload" data-ext="image" data-input="input[name=banner]" data-preview=".preview-upload-banner">已上传的图片</button>
                            <input type="hidden" name="banner" value="{$info.banner}"/>
                            <img src="{$info.banner}" class="preview-upload-banner" alt="" style="width:600px;height:150px;background:#CCCCCC;display:block">
                        </div>
                    </div>

                </div>


                <div class="row">
                    <div class="col-lg-12 col-md-12">
                        <div class="col-lg-1 col-md-1">缩略图</div>
                        <div class="col-lg-10 col-md-10">
                            <button type="button" class="btn btn-primary upload-thumb">上传图片</button>
                            <button type="button" class="btn btn-info show-upload" data-ext="image" data-input="input[name=thumb]" data-preview=".preview-upload-thumb">已上传的图片</button>
                            <span class="text-info">请上传640*360的图片</span>
                            <input type="hidden" name="thumb" value="{$info.thumb}"/>
                            <img src="{$info.thumb}" class="preview-upload-thumb" alt="" style="width:640px;height:360px;background:#CCCCCC;display:block">
                        </div>
                    </div>

                </div>

                <div class="row">
                    <div class="col-lg-12 col-md-12">
                        <textarea name="content" class="form-control" id="content" style="width: 100%;
    height: 500px;
    border: 1px solid #ddd;
    border-radius: 3px;
    -webkit-border-radius: 3px;">{$info.content}</textarea>
                    </div>
                </div>
                <div class="form-group">
                    <div class="label">
                        <label></label>
                    </div>
                    <div class="field">
                        <button class="button bg-main icon-check-square-o" type="submit"> 提交</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</block>